﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: Tuesday, July 12, 2011 11:08:16 AM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace DatabaseGeneric.HelperClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	
	
	/// <summary>
	/// Singleton implementation of the FieldInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.
	/// </summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the FieldInfoProviderBase class is threadsafe.</remarks>
	internal sealed class FieldInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IFieldInfoProvider _providerInstance = new FieldInfoProviderCore();
		#endregion
		
		/// <summary>private ctor to prevent instances of this class.</summary>
		private FieldInfoProviderSingleton()
		{
		}

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static FieldInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the FieldInfoProviderCore</summary>
		/// <returns>Instance of the FieldInfoProvider.</returns>
		public static IFieldInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the FieldInfoProvider. Used by singleton wrapper.</summary>
	internal class FieldInfoProviderCore : FieldInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="FieldInfoProviderCore"/> class.</summary>
		internal FieldInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores.</summary>
		private void Init()
		{
			base.InitClass( (5 + 0));
			InitChungLoaiSanPhamEntityInfos();
			InitLoginLogoutEntityInfos();
			InitSanPhamEntityInfos();
			InitSanPhamKhuonEntityInfos();
            InitSanPhamClastEntityInfos();
            InitSanPhamGotCheEntityInfos();
            InitSanPhamBoEntityInfos();
			base.ConstructElementFieldStructures(InheritanceInfoProviderSingleton.GetInstance());
		}

		/// <summary>Inits ChungLoaiSanPhamEntity's FieldInfo objects</summary>
		private void InitChungLoaiSanPhamEntityInfos()
		{
			base.AddElementFieldInfo("ChungLoaiSanPhamEntity", "MaChungLoaiSanPham", typeof(System.String), true, false, false, false,  (int)ChungLoaiSanPhamFieldIndex.MaChungLoaiSanPham, 20, 0, 0);
			base.AddElementFieldInfo("ChungLoaiSanPhamEntity", "TenChungLoaiSanPham", typeof(System.String), false, false, false, true,  (int)ChungLoaiSanPhamFieldIndex.TenChungLoaiSanPham, 200, 0, 0);
		}
		/// <summary>Inits LoginLogoutEntity's FieldInfo objects</summary>
		private void InitLoginLogoutEntityInfos()
		{
			base.AddElementFieldInfo("LoginLogoutEntity", "Username", typeof(System.String), true, false, false, false,  (int)LoginLogoutFieldIndex.Username, 10, 0, 0);
			base.AddElementFieldInfo("LoginLogoutEntity", "Fullname", typeof(System.String), false, false, false, true,  (int)LoginLogoutFieldIndex.Fullname, 100, 0, 0);
			base.AddElementFieldInfo("LoginLogoutEntity", "Password", typeof(System.String), false, false, false, true,  (int)LoginLogoutFieldIndex.Password, 100, 0, 0);
			base.AddElementFieldInfo("LoginLogoutEntity", "Role", typeof(System.String), false, false, false, true,  (int)LoginLogoutFieldIndex.Role, 10, 0, 0);
		}
		/// <summary>Inits SanPhamEntity's FieldInfo objects</summary>
		private void InitSanPhamEntityInfos()
		{
			base.AddElementFieldInfo("SanPhamEntity", "MaChungLoaiSanPham", typeof(System.String), false, true, false, false,  (int)SanPhamFieldIndex.MaChungLoaiSanPham, 20, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "MaSanPham", typeof(System.String), true, false, false, false,  (int)SanPhamFieldIndex.MaSanPham, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "TenSanPham", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.TenSanPham, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "Phot", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.Phot, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "De", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.De, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "CoSo", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.CoSo, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamEntity", "Last", typeof(System.String), false, false, false, true, (int)SanPhamFieldIndex.Last, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "RapMai", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.RapMai, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "BanhMai", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.BanhMai, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "Quai", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.Quai, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "KhuonMat", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.KhuonMat, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamEntity", "GhiChu", typeof(System.String), false, false, false, true,  (int)SanPhamFieldIndex.GhiChu, 200, 0, 0);
		}
		/// <summary>Inits SanPhamKhuonEntity's FieldInfo objects</summary>
		private void InitSanPhamKhuonEntityInfos()
		{
			base.AddElementFieldInfo("SanPhamKhuonEntity", "MaChungLoaiSanPham", typeof(System.String), false, true, false, false,  (int)SanPhamKhuonFieldIndex.MaChungLoaiSanPham, 20, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "MaSanPhamKhuon", typeof(System.String), true, false, false, false,  (int)SanPhamKhuonFieldIndex.MaSanPhamKhuon, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "TenSanPhamKhuon", typeof(System.String), false, false, false, true,  (int)SanPhamKhuonFieldIndex.TenSanPhamKhuon, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "LoaiSanPhamKhuon", typeof(System.String), false, false, false, true,  (int)SanPhamKhuonFieldIndex.LoaiSanPhamKhuon, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "HinhSanPhamKhuon", typeof(System.Byte[]), false, false, false, true,  (int)SanPhamKhuonFieldIndex.HinhSanPhamKhuon, 2147483647, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "DonViTinh", typeof(System.String), false, false, false, true,  (int)SanPhamKhuonFieldIndex.DonViTinh, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "CoSo", typeof(System.String), false, false, false, true,  (int)SanPhamKhuonFieldIndex.CoSo, 200, 0, 0);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "SoLuong", typeof(Nullable<System.Int32>), false, false, false, true,  (int)SanPhamKhuonFieldIndex.SoLuong, 0, 0, 10);
			base.AddElementFieldInfo("SanPhamKhuonEntity", "GhiChu", typeof(System.String), false, false, false, true,  (int)SanPhamKhuonFieldIndex.GhiChu, 200, 0, 0);
		}
        /// <summary>Inits SanPhamClastEntity's FieldInfo objects</summary>
        private void InitSanPhamClastEntityInfos()
        {
            base.AddElementFieldInfo("SanPhamClastEntity", "MaChungLoaiSanPham", typeof(System.String), false, true, false, false, (int)SanPhamClastFieldIndex.MaChungLoaiSanPham, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "MaSanPhamClast", typeof(System.String), true, false, false, false, (int)SanPhamClastFieldIndex.MaSanPhamClast, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "TenSanPhamClast", typeof(System.String), false, false, false, true, (int)SanPhamClastFieldIndex.TenSanPhamClast, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "LoaiSanPhamClast", typeof(System.String), false, false, false, true, (int)SanPhamClastFieldIndex.LoaiSanPhamClast, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "HinhSanPhamClast", typeof(System.Byte[]), false, false, false, true, (int)SanPhamClastFieldIndex.HinhSanPhamClast, 2147483647, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "DonViTinh", typeof(System.String), false, false, false, true, (int)SanPhamClastFieldIndex.DonViTinh, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "CoSo", typeof(System.String), false, false, false, true, (int)SanPhamClastFieldIndex.CoSo, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamClastEntity", "SoLuong", typeof(Nullable<System.Int32>), false, false, false, true, (int)SanPhamClastFieldIndex.SoLuong, 0, 0, 10);
            base.AddElementFieldInfo("SanPhamClastEntity", "GhiChu", typeof(System.String), false, false, false, true, (int)SanPhamClastFieldIndex.GhiChu, 200, 0, 0);
        }

        private void InitSanPhamGotCheEntityInfos()
        {
            base.AddElementFieldInfo("SanPhamGotCheEntity", "MaChungLoaiSanPham", typeof(System.String), false, true, false, false, (int)SanPhamGotCheFieldIndex.MaChungLoaiSanPham, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamGotCheEntity", "TenPhot", typeof(System.String), true, false, false, false, (int)SanPhamGotCheFieldIndex.TenPhot, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamGotCheEntity", "MaSanPham", typeof(System.String), true, false, false, false, (int)SanPhamGotCheFieldIndex.MaSanPham, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamGotCheEntity", "TenSanPham", typeof(System.String), false, false, false, true, (int)SanPhamGotCheFieldIndex.TenSanPham, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamGotCheEntity", "CSGotCheDoi", typeof(System.String), false, false, false, true, (int)SanPhamGotCheFieldIndex.CSGotCheDoi, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamGotCheEntity", "CSGotCheDon", typeof(System.String), false, false, false, true, (int)SanPhamGotCheFieldIndex.CSGotCheDon, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamGotCheEntity", "GhiChu", typeof(System.String), false, false, false, true, (int)SanPhamGotCheFieldIndex.GhiChu, 200, 0, 0);
        }
        private void InitSanPhamBoEntityInfos()
        {
            base.AddElementFieldInfo("SanPhamBoEntity", "MaChungLoaiSanPham", typeof(System.String), false, true, false, false, (int)SanPhamBoFieldIndex.MaChungLoaiSanPham, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "MaChungLoaiBo", typeof(System.String), true, false, false, false, (int)SanPhamBoFieldIndex.MaChungLoaiBo, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "TenChungLoaiBo", typeof(System.String), false, false, false, true, (int)SanPhamBoFieldIndex.TenChungLoaiBo, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "BanCat", typeof(System.String), false, false, false, true, (int)SanPhamBoFieldIndex.BanCat, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "BanThanhPham", typeof(System.String), false, false, false, true, (int)SanPhamBoFieldIndex.BanThanhPham, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "MaSanPhamBo", typeof(System.String), false, false, false, true, (int)SanPhamBoFieldIndex.MaSanPhamBo, 20, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "HinhSanPhamBo", typeof(System.Byte[]), false, false, false, true, (int)SanPhamBoFieldIndex.HinhSanPhamBo, 2147483647, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "SoLuong", typeof(Nullable<System.Int32>), false, false, false, true, (int)SanPhamBoFieldIndex.SoLuong, 0, 0, 10);
            base.AddElementFieldInfo("SanPhamBoEntity", "VatTu", typeof(System.String), false, false, false, true, (int)SanPhamBoFieldIndex.VatTu, 200, 0, 0);
            base.AddElementFieldInfo("SanPhamBoEntity", "GhiChu", typeof(System.String), false, false, false, true, (int)SanPhamBoFieldIndex.GhiChu, 200, 0, 0);
        }
    }
}




